diff -Nur utils3-orig/bsp/bspinfo3/makefile utils3/bsp/bspinfo3/makefile
--- utils3-orig/bsp/bspinfo3/makefile	1997-08-25 19:02:32.000000000 +0400
+++ utils3/bsp/bspinfo3/makefile	2015-06-01 23:47:29.000000000 +0400
@@ -1,7 +1,7 @@
 
-CFLAGS = -c
+CFLAGS = -c -I../../common -O3
 LDFLAGS =
-ODIR = baddir
+ODIR = ./
 
 EXEBASE = bspinfo3
 EXE = $(ODIR)/bspinfo3
@@ -27,7 +27,7 @@
 	make "CFLAGS = -c -O4 -I../../common -threads -DDOUBLEVEC_T" "LDFLAGS = -threads" "ODIR = osf"
 	
 clean:
-	rm -f irix/*.o irix/$(EXEBASE)
+	rm -f $(ODIR)/*.o $(EXE)
 
 install:
 	cp irix/$(EXEBASE) /limbo/quake2/bin_irix
diff -Nur utils3-orig/bsp/qbsp3/makefile utils3/bsp/qbsp3/makefile
--- utils3-orig/bsp/qbsp3/makefile	1997-08-28 23:33:10.000000000 +0400
+++ utils3/bsp/qbsp3/makefile	2015-05-31 00:54:17.000000000 +0400
@@ -1,7 +1,7 @@
 
-CFLAGS = -c
+CFLAGS = -c -I../../common -O3
 LDFLAGS =
-ODIR = baddir
+ODIR = ./
 
 EXEBASE = qbsp3
 EXE = $(ODIR)/qbsp3
@@ -27,7 +27,7 @@
 	make "CFLAGS = -c -O4 -I../../common -threads -DDOUBLEVEC_T" "LDFLAGS = -threads" "ODIR = osf"
 	
 clean:
-	rm -f irix/*.o irix/$(EXEBASE)
+	rm -f $(ODIR)/*.o $(EXE)
 
 install:
 	cp irix/$(EXEBASE) /limbo/quake2/bin_irix
diff -Nur utils3-orig/bsp/qrad3/makefile utils3/bsp/qrad3/makefile
--- utils3-orig/bsp/qrad3/makefile	1997-08-25 19:02:04.000000000 +0400
+++ utils3/bsp/qrad3/makefile	2015-05-31 00:54:17.000000000 +0400
@@ -1,7 +1,7 @@
 
-CFLAGS = -c
+CFLAGS = -c -I../../common -O3
 LDFLAGS =
-ODIR = baddir
+ODIR = ./
 
 EXEBASE = qrad3
 EXE = $(ODIR)/qrad3
@@ -27,7 +27,7 @@
 	make "CFLAGS = -c -O4 -I../../common -threads" "LDFLAGS = -threads" "ODIR = osf"
 
 clean:
-	rm -f irix/*.o irix/$(EXEBASE)
+	rm -f $(ODIR)/*.o $(EXE)
 
 install:
 	cp irix/$(EXEBASE) /limbo/quake2/bin_irix
diff -Nur utils3-orig/bsp/qrad3/trace.c utils3/bsp/qrad3/trace.c
--- utils3-orig/bsp/qrad3/trace.c	1997-08-09 15:11:28.000000000 +0400
+++ utils3/bsp/qrad3/trace.c	2015-05-31 00:54:17.000000000 +0400
@@ -65,7 +65,7 @@
 {
 	// 32 byte align the structs
 	tnodes = malloc( (numnodes+1) * sizeof(tnode_t));
-	tnodes = (tnode_t *)(((int)tnodes + 31)&~31);
+	tnodes = (tnode_t *)(((size_t)tnodes + (sizeof(size_t)-1))&~(sizeof(size_t)-1));
 	tnode_p = tnodes;
 
 	MakeTnode (0);
diff -Nur utils3-orig/bsp/qvis3/makefile utils3/bsp/qvis3/makefile
--- utils3-orig/bsp/qvis3/makefile	1997-11-16 17:16:10.000000000 +0300
+++ utils3/bsp/qvis3/makefile	2015-05-31 00:54:17.000000000 +0400
@@ -1,7 +1,7 @@
 
-CFLAGS = -c
+CFLAGS = -c -I../../common -O3
 LDFLAGS =
-ODIR = baddir
+ODIR = ./
 
 EXEBASE = qvis3
 EXE = $(ODIR)/qvis3
@@ -24,7 +24,7 @@
 	make "CFLAGS = -c -O4 -I../../common -threads" "LDFLAGS = -threads -lm" "ODIR = osf"
 	
 clean:
-	rm -f irix/*.o irix/$(EXEBASE)
+	rm -f $(ODIR)/*.o $(EXE)
 
 install:
 	cp irix/$(EXEBASE) /limbo/quake2/bin_irix
